#include <iostream>
#include <cmath>
using namespace std;
typedef long long ll;
const ll mod=998244353;

ll qpow(ll a,ll n)
{
	ll res=1;
	while(n)
	{
		if(n&1==1)
		{
			res=res*a%mod;
		}
		a=a*a%mod;
		n>>=1;
	}
	return res;
}
int main()
{
	ll n,m;
	cin>>n>>m;
	m+=n;
	ll r=3;
	ll p=2;
	ll f=1;
	ll ans=1;
	while(n<m)
	{
		if(n>=r)
		{
			p*=2;
			r+=p;
			f+=1;
		}
	    if(r>m)
	    {
	    	r=m;
		}
		ll cnt=r-n;
	    
	    ans=ans*qpow(1ll+mod-qpow(2,mod-1-f),cnt)%mod;
	    n=r;
	}
	cout<<ans;
	
	return 0;
}
